home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / base / doc.sty < prev    next >
Text File  |  1995-03-15  |  29KB  |  755 lines

  1. %% 
  2. %% This is file `doc.sty', generated 
  3. %% on <1995/3/2> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% doc.dtx  (with options: `package')
  8. %% 
  9. %% Copyright 1994 the LaTeX3 project and the individual authors. 
  10. %% All rights reserved. For further copyright information see the file 
  11. %% legal.txt, and any other copyright indicated in this file. 
  12. %% 
  13. %% This file is part of the LaTeX2e system. 
  14. %% ---------------------------------------- 
  15. %% 
  16. %% This system is distributed in the hope that it will be useful, 
  17. %% but WITHOUT ANY WARRANTY; without even the implied warranty of 
  18. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  19. %% 
  20. %% 
  21. %% IMPORTANT NOTICE: 
  22. %% 
  23. %% For error reports in case of UNCHANGED versions see bugs.txt. 
  24. %% 
  25. %% Please do not request updates from us directly. Distribution is 
  26. %% done through Mail-Servers and TeX organizations. 
  27. %% 
  28. %% You are not allowed to change this file. 
  29. %% 
  30. %% You are allowed to distribute this file under the condition that 
  31. %% it is distributed together with all files mentioned in manifest.txt. 
  32. %% 
  33. %% If you receive only some of these files from someone, complain! 
  34. %% 
  35. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  36. %% ALLOWED to take money for the distribution or use of either this 
  37. %% file or a changed version, except for a nominal charge for copying 
  38. %% etc. 
  39. \NeedsTeXFormat{LaTeX2e}
  40.  \ProvidesPackage{doc}
  41.   [1994/10/14 v1.9s
  42.    Standard LaTeX documentation package (FMi)]
  43. %% \CharacterTable
  44. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  45. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  46. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  47. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  48. %%   Dollar        \$     Percent       \%     Ampersand     \&
  49. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  50. %%   Asterisk      \*     Plus          \+     Comma         \,
  51. %%   Minus         \-     Point         \.     Solidus       \/
  52. %%   Colon         \:     Semicolon     \;     Less than     \<
  53. %%   Equals        \=     Greater than  \>     Question mark \?
  54. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  55. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  56. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  57. %%   Right brace   \}     Tilde         \~}
  58. %%
  59. %% Package `doc' to use with LaTeX 2e
  60. %% Copyright (C) 1989-1994 Frank Mittelbach, all rights reserved.
  61. \@ifundefined{macro@cnt}{}{\endinput}
  62. \catcode`\^^A=14
  63. \def\macrocode{\macro@code
  64.    \frenchspacing \@vobeyspaces
  65.    \xmacro@code}
  66. \def\macro@code{%
  67.    \topsep \MacrocodeTopsep
  68.    \@beginparpenalty \predisplaypenalty
  69.    \if@inlabel\leavevmode\fi
  70.    \trivlist \parskip \z@ \item[]%
  71.    \macro@font
  72.    \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
  73.    \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
  74.    \blank@linefalse \def\par{\ifblank@line
  75.                              \leavevmode\fi
  76.                              \blank@linetrue\@@par
  77.                              \penalty\interlinepenalty}
  78.    \obeylines
  79.    \let\do\do@noligs \verbatim@nolig@list
  80.    \let\do\@makeother \dospecials
  81.    \global\@newlistfalse
  82.    \global\@minipagefalse
  83.    \ifcodeline@index
  84.      \everypar{\global\advance\c@CodelineNo\@ne
  85.                \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
  86.                \check@module}%
  87.    \else \everypar{\check@module}%
  88.    \fi
  89.    \init@crossref}
  90. \newif\ifblank@line
  91. \def\endmacrocode{%
  92.                  \ifpm@module \endgroup \pm@modulefalse \fi
  93.                  \everypar{}%
  94.                  \global\@inlabelfalse
  95.                  \endtrivlist
  96.                  \close@crossref}
  97. \@ifundefined{MacroFont}{%
  98.     \def\MacroFont{\math@fontsfalse\reset@font\small\ttfamily}%
  99.   }{}
  100. \@ifundefined{AltMacroFont}{%
  101.     \def\AltMacroFont{\math@fontsfalse\small
  102.                       \reset@font\slshape\ttfamily}%
  103.   }{}
  104. \let\macro@font=\MacroFont
  105. \def\check@module{%
  106.   \ifcheck@modules
  107.     \ifpm@module \endgroup \pm@modulefalse \fi
  108.     \expandafter\futurelet\expandafter\next\expandafter\ch@percent
  109.   \fi}
  110. \newif\ifpm@module
  111. \def\DontCheckModules{\check@modulesfalse}
  112. \def\CheckModules{\check@modulestrue}
  113. \newif\ifcheck@modules  \check@modulestrue
  114. \def\ch@percent{%
  115.   \if \percentchar\next
  116.     \expandafter\check@angle
  117.   \fi}
  118. \def\check@angle#1{\futurelet\next\ch@angle}
  119. \begingroup
  120. \catcode`\<\active
  121. \gdef\ch@angle{\ifx<\next
  122.     \expandafter\ch@plus@etc
  123.   \else \percentchar \fi}
  124. \gdef\ch@plus@etc<{\futurelet\next\check@plus@etc}
  125. \endgroup
  126. \def\check@plus@etc{%
  127.     \if +\next
  128.       \let\next\pm@module
  129.     \else\if -\next
  130.       \let\next\pm@module
  131.     \else\if *\next
  132.       \let\next\star@module
  133.     \else\if /\next
  134.       \let\next\slash@module
  135.     \else
  136.       \let\next\pm@module
  137.     \fi\fi\fi\fi
  138.     \next}
  139. \begingroup
  140. \catcode`\~=\active
  141. \lccode`\~=`\>
  142. \lowercase{\gdef\pm@module#1~}{\pm@moduletrue
  143.    \Module{#1}\begingroup
  144.      \advance\guard@level\@ne
  145.      \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
  146. }
  147. \lowercase{\gdef\star@module#1~}{%
  148.   \Module{#1}%
  149.   \global \advance \guard@level\@ne
  150.   \ifnum \guard@level>\c@StandardModuleDepth
  151.     \global\let\macro@font=\AltMacroFont \macro@font
  152.   \fi}
  153. \catcode`\>=\active
  154. \gdef\slash@module#1>{%
  155.   \Module{#1}%
  156.   \global \advance \guard@level\m@ne
  157.   \ifnum \guard@level=\c@StandardModuleDepth
  158.     \global\let\macro@font\MacroFont  \macro@font
  159.   \fi
  160. }
  161. \endgroup
  162. \newcounter{StandardModuleDepth}
  163. \newcount \guard@level
  164. \@ifundefined{Module}{%
  165.       \def\Module#1{\mod@math@codes$\langle\mathsf{#1}\rangle$}
  166.   }{}
  167. \def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
  168. \newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
  169. \newdimen\MacroIndent
  170. \settowidth\MacroIndent{\rmfamily\scriptsize 00\ }
  171. \@namedef{macrocode*}{\macro@code\sxmacro@code}
  172. \expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
  173. \catcode`\!=\catcode`\%   ^^A In this section there must not be
  174.                               ^^A any exclamation marks.
  175.                               ^^A
  176. \begingroup
  177. \catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
  178. \catcode`\{=12 \catcode`\}=12
  179. \catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
  180. !%    \end{macrocode*}
  181. !    Next follows the actual definition of  |\macro@code|;
  182. !    notice the
  183. !    use of the new escape character.  We manage to get the argument
  184. !    surrounded by the string |\end{macrocode}|, but at the end
  185. !    however, in spite of the actual characters used during the
  186. !    definition of
  187. !    this macro, |\end| with the argument |{macrocode}|
  188. !    will be executed, to ensure a balanced environment.
  189. !    \begin{macrocode*}
  190. |gdef|xmacro@code#1%    \end{macrocode}[#1|end[macrocode]]
  191. !%    \end{macrocode*}
  192. ! \begin{macro}{\sxmacro@code}
  193. !    The definition of |\sxmacro@code| is completely analogous,
  194. !    only
  195. !    here a slightly different terminating string will be used.
  196. !    Note that the space is not active in this environment.
  197. !    \begin{macrocode}
  198. |catcode`| =12
  199. |gdef|sxmacro@code#1%    \end{macrocode*}[#1|end[macrocode*]]
  200. !%    \end{macrocode}
  201. !    because the |\catcode| changes have been made local by
  202. !    commencing a
  203. !    new group, there now follows the matching |\endgroup|
  204. !    in a rather
  205. !    unusual style of writing.
  206. !    \begin{macrocode}
  207. |endgroup
  208. !%    \end{macrocode}
  209. \catcode`\!=12
  210. \def\DescribeMacro{\leavevmode\@bsphack
  211.    \begingroup\MakePrivateLetters\Describe@Macro}
  212. \def\Describe@Macro#1{\endgroup
  213.               \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  214.               \SpecialUsageIndex{#1}\@esphack\ignorespaces}
  215. \def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  216.   \Describe@Env}
  217. \def\Describe@Env#1{\endgroup
  218.               \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
  219.               \SpecialEnvIndex{#1}\@esphack\ignorespaces}
  220. \reversemarginpar
  221. \setlength\marginparpush{0pt}  \setlength\marginparwidth{8pc}
  222. {\catcode`\|=\z@ \catcode`\\=12
  223. |gdef|bslash{\}}
  224. \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
  225.               \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
  226. \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
  227.               \MacroFont \@sxverbatim}
  228. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  229.       \leftskip\@totalleftmargin\rightskip\z@
  230.       \parindent\z@\parfillskip\@flushglue\parskip\z@
  231.       \@@par
  232.       \@tempswafalse
  233.  \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
  234.           \penalty\interlinepenalty
  235.    \check@percent}%
  236.  \obeylines
  237.  \let\do\do@noligs \verbatim@nolig@list
  238.  \let\do\@makeother \dospecials}
  239. {\catcode`\%=12
  240.  \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else
  241.                                     \let\next=#1\fi \next}}
  242. \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
  243.   \bgroup \let\do\do@noligs \verbatim@nolig@list
  244.     \ttfamily \verb@eol@error \let\do\@makeother \dospecials
  245.     \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
  246. \let\verb@balance@group\@empty
  247.  
  248. \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup}
  249.  
  250. \begingroup
  251.   \obeylines%
  252.   \gdef\verb@eol@error{\obeylines%
  253.     \def^^M{\verb@egroup\@latex@error{%
  254.            Text for \noexpand\verb command ended by end of line}\@ehc}}%
  255. \endgroup
  256. \def\@sverb#1{%
  257.   \catcode`#1\active  \lccode`\~`#1%
  258.   \gdef\verb@balance@group{\verb@egroup
  259.      \@latex@error{Illegal use of \noexpand\verb command}\@ehc}%
  260.   \aftergroup\verb@balance@group
  261.   \lowercase{\let~\verb@egroup}}
  262. \def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-}
  263. \def\do@noligs#1{%
  264.   \catcode`#1\active
  265.   \begingroup
  266.      \lccode`\~=`#1\relax
  267.      \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}}
  268. \newcount\macro@cnt \macro@cnt=0
  269. \def\macro{\begingroup
  270.    \catcode`\\12
  271.    \MakePrivateLetters \m@cro@ \iftrue}
  272. \def\environment{\begingroup
  273.    \catcode`\\12
  274.    \MakePrivateLetters \m@cro@ \iffalse}
  275. \long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
  276.    \edef\saved@macroname{\string#2}%
  277.   \def\makelabel##1{\llap{##1}}%
  278.   \if@inlabel
  279.     \let\@tempa\@empty \count@\macro@cnt
  280.     \loop \ifnum\count@>\z@
  281.       \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
  282.     \edef\makelabel##1{\llap{\vtop to\baselineskip
  283.                                {\@tempa\hbox{##1}\vss}}}%
  284.     \advance \macro@cnt \@ne
  285.   \else  \macro@cnt\@ne  \fi
  286.   \edef\@tempa{\noexpand\item[%
  287.      #1%
  288.        \noexpand\PrintMacroName
  289.      \else
  290.        \noexpand\PrintEnvName
  291.      \fi
  292.      {\string#2}]}%
  293.   \@tempa
  294.   {\advance\c@CodelineNo\@ne
  295.    #1%
  296.       \SpecialMainIndex{#2}\nobreak
  297.       \DoNotIndex{#2}%
  298.    \else
  299.       \SpecialMainEnvIndex{#2}\nobreak
  300.    \fi
  301.    }%
  302.   \ignorespaces}
  303. \let\endmacro \endtrivlist
  304. \let\endenvironment\endmacro
  305. \newskip\MacroTopsep     \MacroTopsep = 7pt plus 2pt minus 2pt
  306. \@ifundefined{PrintMacroName}
  307.    {\def\PrintMacroName#1{\strut \MacroFont \string #1\ }}{}
  308. \@ifundefined{PrintDescribeMacro}
  309.    {\def\PrintDescribeMacro#1{\strut \MacroFont \string #1\ }}{}
  310. \@ifundefined{PrintDescribeEnv}
  311.    {\def\PrintDescribeEnv#1{\strut \MacroFont #1\ }}{}
  312. \@ifundefined{PrintEnvName}
  313.    {\def\PrintEnvName#1{\strut \MacroFont #1\ }}{}
  314. \begingroup
  315. \catcode`\~\active
  316. \gdef\SpecialEscapechar#1{%
  317.     \begingroup
  318.      \uccode`\~`#1%
  319.      \uppercase{\gdef\active@escape@char{~}}%
  320.      \escapechar\m@ne  \xdef\special@escape@char{\string#1}%
  321.    \endgroup}
  322. \endgroup
  323. \begingroup   \catcode`\|=\z@  \catcode`\\=\active
  324. |gdef|init@crossref{|catcode`|\|active   |let\|bslash
  325.     |MakePrivateLetters
  326.     |catcode|expandafter`|special@escape@char|active
  327.     |expandafter|let|active@escape@char|scan@macro}
  328. |endgroup
  329. \SpecialEscapechar{\\}
  330. \@ifundefined{MakePrivateLetters}
  331.     {\let\MakePrivateLetters\makeatletter}{}
  332. \def\close@crossref{\SpecialEscapechar\\}
  333. \def\scan@macro{%
  334.    \special@escape@char
  335.    \step@checksum
  336.    \ifscan@allowed
  337.       \let\macro@namepart\@empty
  338.       \def\next{\futurelet\next\macro@switch}%
  339.    \else \let\next\@empty \fi
  340.    \next}
  341. \newif\ifscan@allowed    \scan@allowedtrue
  342. \def\DisableCrossrefs{\@bsphack\scan@allowedfalse\@esphack}
  343. \def\EnableCrossrefs{\@bsphack\scan@allowedtrue
  344.                      \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
  345. \def\macro@switch{\ifcat\noexpand\next a%
  346.      \let\next\macro@name
  347.      \else \let\next\short@macro  \fi
  348.    \next}
  349. \def\short@macro#1{\begingroup
  350.    \catcode`\&=11  \uccode`\&=\expandafter`\string#1%
  351.    \uppercase{\def\macro@namepart{&}}%
  352.    \endgroup
  353.    \ifnot@excluded
  354.      \produce@index{#1}\fi
  355.     \scan@allowedfalse#1%
  356.     \scan@allowedtrue }
  357. \def\produce@index#1{%
  358.   \if\noexpand#1\special@escape@char
  359.      \scan@allowedfalse \it@is@a\special@escape@char \else
  360.      \if\noexpand#1\bslash \it@is@a\bslash \else
  361.        \if\noexpand#1\space \it@is@a\space \else
  362.          \ifx#1\par
  363.          \it@is@a\space \else
  364.          \ifx#1\relax \else
  365.            \if\noexpand#1\bgroup \LeftBraceIndex \else
  366.              \if\noexpand#1\egroup \RightBraceIndex \else
  367.                \if\noexpand#1\percentchar \PercentIndex \else
  368.                  \it@is@a{\string#1}%
  369.        \fi \fi \fi \fi \fi \fi \fi \fi}
  370. \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}%
  371.      \futurelet\next\more@macroname}
  372. \def\more@macroname{\ifcat\noexpand\next a%
  373.      \let\next\macro@name
  374.      \else \let\next\macro@finish \fi
  375.      \next}
  376. \def\macro@finish{%
  377.   \macro@namepart
  378.   \ifnot@excluded
  379.      \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
  380.      \@tempa  \fi}
  381. \def\DoNotIndex{\begingroup \MakePrivateLetters
  382.     \catcode`\\12
  383.     \do@not@index}
  384. \long\def\do@not@index#1{%
  385.     \endgroup
  386.     \addto@hook\index@excludelist{#1,}}
  387. \long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
  388. \newtoks\index@excludelist
  389. \index@excludelist{}
  390. \begingroup
  391. \catcode`\|=0%
  392. \catcode`\\=12
  393. |gdef|ifnot@excluded{|expandafter
  394.      |expanded@notin|expandafter{|expandafter
  395.      \|macro@namepart,}{|the|index@excludelist}}
  396. |endgroup
  397. \def\expanded@notin#1#2{%
  398.  \def\in@@##1#1##2##3\in@@{%
  399.   \ifx\expanded@notin##2}%
  400.  \expandafter\in@@#2#1\expanded@notin\in@@}
  401. \@ifundefined{actualchar}{\def\actualchar{=}}{}
  402. \@ifundefined{quotechar}{\def\quotechar{!}}{}
  403. \@ifundefined{levelchar}{\def\levelchar{>}}{}
  404. \@ifundefined{encapchar}{\def\encapchar{|}}{}
  405. \@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
  406. \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
  407.                                       \string#1\actualchar
  408.       \string\verb\quotechar*\verbatimchar\string#1\verbatimchar}%
  409.     \@esphack}
  410.  
  411. \def\SpecialMainIndex#1{\@bsphack\special@index{\expandafter\@gobble
  412.                                         \string#1\actualchar
  413.                                         \string\verb
  414.                                         \quotechar*\verbatimchar
  415.                                         \string#1\verbatimchar
  416.                                         \encapchar main}%
  417.                         \@esphack}
  418. \def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
  419.                                       #1\actualchar
  420.                                       {\string\ttfamily\space#1}
  421.                                          (environment)%
  422.                                       \encapchar main}%
  423.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  424.            main}\@esphack}
  425. \def\SpecialUsageIndex#1{\@bsphack\index{\expandafter\@gobble\string#1%
  426.     \actualchar\string\verb\quotechar*\verbatimchar
  427.     \string#1\verbatimchar
  428.     \encapchar usage}\@esphack}
  429. \def\SpecialEnvIndex#1{\@bsphack
  430.     \index{#1\actualchar{\protect\ttfamily#1}
  431.            (environment)\encapchar usage}%
  432.     \index{environments:\levelchar{\protect\ttfamily#1}\encapchar
  433.            usage}\@esphack}
  434. \def\SortIndex#1#2{\index{#1\actualchar#2}}
  435. \def\it@is@a#1{\special@index{\quotechar #1\actualchar
  436.                           \string\verb\quotechar*\verbatimchar
  437.                           \quotechar\bslash\quotechar#1\verbatimchar}}
  438. \@ifundefined{LeftBraceIndex}{\def\LeftBraceIndex{%
  439.    \special@index{\bgroup\actualchar\string\verb\quotechar*\verbatimchar
  440.           \quotechar\bslash{\verbatimchar\string\iffalse}\string\fi}}}{}
  441.  
  442. \@ifundefined{RightBraceIndex}{\def\RightBraceIndex{%
  443.  \special@index{\egroup\actualchar\string\iffalse{\string\fi\string\verb
  444.            \quotechar*\verbatimchar\quotechar\bslash}\verbatimchar}}}{}
  445. \@ifundefined{PercentIndex}
  446.   {\def\PercentIndex{\it@is@a\percentchar}}{}
  447. \def\OldMakeindex{\def\PercentIndex{%
  448.     \special@index{\quotechar\percentchar\actualchar\string\verb
  449.            \quotechar*\verbatimchar\quotechar\bslash
  450.            \percentchar\percentchar\verbatimchar}}}
  451. {\catcode`\%=12 \gdef\percentchar{%}}
  452. \newif\ifhave@multicol
  453. \IfFileExists{multicol.sty}{\have@multicoltrue
  454.                             \RequirePackage{multicol}%
  455.                            }{}
  456.  
  457. \newdimen\IndexMin         \IndexMin       = 80pt
  458. \newcount\c@IndexColumns   \c@IndexColumns = 3
  459. \ifhave@multicol
  460.   \renewenvironment{theindex}
  461.     {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
  462.       \IndexParms \let\item\@idxitem \ignorespaces}%
  463.     {\end{multicols}}
  464. \else
  465.   \typeout{Can't find multicol.sty -- will use normal index layout if
  466.      necessary.}
  467.   \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  468.     \columnseprule \z@  \columnsep 35\p@
  469.     \twocolumn[\index@prologue]%
  470.     \IndexParms \let\item\@idxitem \ignorespaces}
  471.   \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
  472. \fi
  473. \long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
  474. \@ifundefined{index@prologue}
  475.      {\def\index@prologue{\section*{Index}%
  476.                  \markboth{Index}{Index}%
  477.                  The italic numbers denote the pages where the
  478.                  corresponding entry is described,
  479.                  numbers underlined point to the definition,
  480.                  all others indicate the places where it is used.
  481.                  }}{}
  482. \@ifundefined{IndexParms}
  483.     {\def\IndexParms{%
  484.        \parindent \z@
  485.        \columnsep 15pt
  486.        \parskip 0pt plus 1pt
  487.        \rightskip 15pt
  488.        \mathsurround \z@
  489.        \parfillskip=-15pt
  490.         \small
  491.        \def\@idxitem{\par\hangindent 30pt}%
  492.        \def\subitem{\@idxitem\hspace*{15pt}}%
  493.        \def\subsubitem{\@idxitem\hspace*{25pt}}%
  494.        \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
  495.       }}{}
  496. \def\efill{\hfill\nopagebreak}%
  497. \def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill}%
  498. \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
  499. \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
  500.                \dotfil~\ignorespaces}%
  501. \def\*{\leavevmode\lower.8ex\hbox{$\,\widetilde{\ }\,$}}
  502. \@ifundefined{main}{\def\main#1{\underline{#1}}}{}
  503. \@ifundefined{usage}{\def\usage#1{\textit{#1}}}{}
  504. \def\PrintIndex{\@input@{\jobname.ind}}
  505. \def\printindex{\typeout{\string\printindex\space is obsolete!}%
  506.                 \typeout{Please use \string\PrintIndex\space
  507.                          if you are a macro implementor^^J
  508.                          or get a newer version of the documented
  509.                          software if you are a user}%
  510.                 \PrintIndex}
  511. \def\changes{\@bsphack\begingroup\@sanitize
  512.    \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
  513.    \changes@}
  514. \def\changes@#1#2#3{%
  515.   \def\protect##1{\string##1\space}%
  516.   \edef\@tempa{\noexpand\glossary{#1\levelchar
  517.                                  \expandafter\@gobble
  518.                                  \saved@macroname\actualchar
  519.                                  \string\verb\quotechar*%
  520.                                  \verbatimchar\saved@macroname
  521.                                  \verbatimchar:\levelchar #3}}%
  522.   \@tempa\endgroup\@esphack}
  523. \def\saved@macroname{"General"}
  524. \let\RecordChanges\makeglossary
  525. \newdimen\GlossaryMin         \GlossaryMin       = 80pt
  526. \newcount\c@GlossaryColumns   \c@GlossaryColumns = 2
  527. \ifhave@multicol
  528.   \newenvironment{theglossary}{%
  529.     \begin{multicols}\c@GlossaryColumns
  530.                      [\glossary@prologue][\GlossaryMin]%
  531.     \GlossaryParms \let\item\@idxitem \ignorespaces}%
  532.    {\end{multicols}}
  533. \else
  534.   \newenvironment{theglossary}{%
  535.       \@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  536.       \columnseprule \z@  \columnsep 35\p@
  537.       \twocolumn[\glossary@prologue]%
  538.       \GlossaryParms \let\item\@idxitem \ignorespaces}
  539.     {\if@restonecol\onecolumn\else\clearpage\fi}
  540. \fi
  541. \long\def\GlossaryPrologue#1{\@bsphack
  542.                              \def\glossary@prologue{#1}%
  543.                              \@esphack}
  544. \@ifundefined{glossary@prologue}
  545.      {\def\glossary@prologue{\section*{{Change History}}%
  546.                  \markboth{{Change History}}{{Change History}}%
  547.                  }}{}
  548. \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}
  549. \def\PrintChanges{\@input@{\jobname.gls}}
  550. \long\def\StopEventually#1{\@bsphack\gdef\Finale{#1%
  551.               \check@checksum}%
  552.            \init@checksum
  553.            \@esphack}
  554. \def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
  555.            ##1\endinput}\@esphack}
  556. \let\Finale\relax
  557. \begingroup
  558. \obeyspaces%
  559. \catcode`\^^M\active%
  560. \gdef\meta{\begingroup\obeyspaces\catcode`\^^M\active%
  561. \let^^M\do@space\let \do@space%
  562. \def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}%
  563. \m@ta}%
  564. \endgroup
  565. \def\m@ta#1{\leavevmode\hbox\bgroup$\langle$\itshape#1\/$\rangle$\egroup
  566.     \endgroup}
  567. \def\do@space{\egroup\space
  568.     \hbox\bgroup\itshape\futurelet\next\sp@ce}
  569. \def\sp@ce{\ifx\next\do@space\expandafter\sp@@ce\fi}
  570. \def\sp@@ce#1{\futurelet\next\sp@ce}
  571. \def\IndexInput#1{%
  572.      \begingroup \macro@code
  573.    \frenchspacing \@vobeyspaces
  574.      \input{#1}\endmacrocode
  575.      \endgroup}
  576. \def\maketitle{\par
  577.       \begingroup \def \thefootnote {\fnsymbol {footnote}}%
  578.       \setcounter {footnote}\z@
  579.       \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
  580.       \long\def\@makefntext##1{\parindent 1em\noindent
  581.             \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
  582.       \if@twocolumn \twocolumn [\@maketitle ]%
  583.       \else \newpage \global \@topnum \z@ \@maketitle \fi
  584.        \thispagestyle{titlepage}\@thanks \endgroup
  585.       \setcounter {footnote}\z@
  586.       \gdef\@date{\today}\gdef\@thanks{}%
  587.       \gdef\@author{}\gdef\@title{}}
  588. \@ifundefined{ps@titlepage}
  589.     {\let\ps@titlepage=\ps@plain}{}
  590. \def\MakeShortVerb#1{%
  591.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  592.     \typeout{*** Made \expandafter\@gobble\string#1\space a short
  593.              reference for \string\verb \on@line\space ***}%
  594.     \add@special{#1}%
  595.     \expandafter
  596.     \xdef\csname cc\string#1\endcsname{\the\catcode`#1}%
  597.     \begingroup
  598.       \catcode`\~\active  \lccode`\~`#1%
  599.       \lowercase{%
  600.       \global\expandafter\let
  601.          \csname ac\string#1\endcsname~%
  602.       \gdef~{\verb~}}%
  603.     \endgroup
  604.     \global\catcode`#1\active
  605.   \else
  606.     \typeout{*** \expandafter\@gobble\string#1\space is already a
  607.              short reference for \string\verb \on@line\space ***}%
  608.   \fi}
  609. \def\DeleteShortVerb#1{%
  610.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  611.   \else
  612.     \typeout{*** Deleted \expandafter\@gobble\string#1\space as short
  613.              reference for \string\verb \on@line\space ***}%
  614.     \rem@special{#1}%
  615.     \global\catcode`#1\csname cc\string#1\endcsname
  616.     \global \expandafter\let \csname cc\string#1\endcsname \relax
  617.     \ifnum\catcode`#1=\active
  618.       \begingroup
  619.         \catcode`\~\active   \lccode`\~`#1%
  620.         \lowercase{%
  621.           \global\expandafter\let\expandafter~%
  622.           \csname ac\string#1\endcsname}%
  623.       \endgroup \fi \fi}
  624. \def\add@special#1{%
  625.   \rem@special{#1}%
  626.   \expandafter\gdef\expandafter\dospecials\expandafter
  627.     {\dospecials \do #1}%
  628.   \expandafter\gdef\expandafter\@sanitize\expandafter
  629.     {\@sanitize \@makeother #1}}
  630. \def\rem@special#1{%
  631.   \def\do##1{%
  632.     \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
  633.   \xdef\dospecials{\dospecials}%
  634.   \begingroup
  635.     \def\@makeother##1{%
  636.       \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
  637.     \xdef\@sanitize{\@sanitize}%
  638.   \endgroup}
  639. \def\MakeShortverb{\typeout{*** Switch to \noexpand\MakeShortVerb
  640.                          syntax, this is obsolete ***}\MakeShortVerb}
  641. \def\DeleteShortverb{\typeout{*** Switch to \noexpand\DeleteShortVerb
  642.                          syntax, this is obsolete ***}\DeleteShortVerb}
  643. \def\init@checksum{\relax
  644.     \global\bslash@cnt\z@}
  645. \def\check@checksum{\relax
  646.      \ifnum\check@sum=\z@
  647.        \typeout{**********************************}%
  648.        \typeout{* This macro file has no checksum!}%
  649.        \typeout{* The checksum should be \the\bslash@cnt!}%
  650.        \typeout{**********************************}%
  651.      \else
  652.        \ifnum\check@sum=\bslash@cnt
  653.          \typeout{*******************}%
  654.          \typeout{* Checksum passed *}%
  655.          \typeout{*******************}%
  656.        \else
  657.          \PackageError{doc}{Checksum not passed
  658.                     (\the\check@sum<>\the\bslash@cnt)}%
  659.           {The file currently documented seems to be wrong.^^J%
  660.            Try to get a correct version.}%
  661.        \fi
  662.      \fi
  663.      \global\check@sum\z@}
  664. \newcount\check@sum           \check@sum  = \z@
  665. \newcount\bslash@cnt          \bslash@cnt = \z@
  666. \def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
  667. \def\step@checksum{\global\advance\bslash@cnt\@ne}
  668. \def\CharacterTable{\begingroup \CharTableChanges \character@table}
  669. \begingroup
  670.   \catcode`\~=11
  671.   \gdef\character@table#1{\def\used~table{#1}%
  672.       \ifx\used~table\default~table
  673.            \typeout{***************************}%
  674.            \typeout{* Character table correct *}%
  675.            \typeout{***************************}%
  676.       \else
  677.          \PackageError{doc}{Character table corrupted}
  678.                            {\the\wrong@table}
  679.          \show\default~table
  680.          \show\used~table
  681.       \fi
  682.       \endgroup}
  683.   \global\let\CharTableChanges\@empty
  684.   \makeatother
  685.   \gdef\default~table
  686.      {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  687.       Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  688.       Digits        \0\1\2\3\4\5\6\7\8\9
  689.       Exclamation   \!     Double quote  \"     Hash (number) \#
  690.       Dollar        \$     Percent       \%     Ampersand     \&
  691.       Acute accent  \'     Left paren    \(     Right paren   \)
  692.       Asterisk      \*     Plus          \+     Comma         \,
  693.       Minus         \-     Point         \.     Solidus       \/
  694.       Colon         \:     Semicolon     \;     Less than     \<
  695.       Equals        \=     Greater than  \>     Question mark \?
  696.       Commercial at \@     Left bracket  \[     Backslash     \\
  697.       Right bracket \]     Circumflex    \^     Underscore    \_
  698.       Grave accent  \`     Left brace    \{     Vertical bar  \|
  699.       Right brace   \}     Tilde         \~}
  700. \endgroup
  701.   \newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J
  702.             I now \string\show\space you both tables for comparison.}
  703. \newif\ifcodeline@index \codeline@indexfalse
  704. \let\CodelineNumbered\codeline@indextrue
  705. \def\codeline@wrindex#1{\if@filesw
  706.         \immediate\write\@indexfile
  707.             {\string\indexentry{#1}%
  708.             {\number\c@CodelineNo}}\fi}
  709. \let\special@index = \@gobble
  710. \def\CodelineIndex{\makeindex
  711.                    \codeline@indextrue
  712.                    \let\special@index\codeline@wrindex}
  713. \def\PageIndex{\makeindex
  714.                \codeline@indexfalse
  715.                \let\special@index\index}
  716. \newcount\c@CodelineNo  \c@CodelineNo\z@
  717. \@ifundefined{theCodelineNo}
  718.   {\ifx\selectfont\undefined
  719.      \def\theCodelineNo{\rmfamily\scriptsize\arabic{CodelineNo}}%
  720.    \else
  721.      \def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}}%
  722.    \fi}
  723.   {}
  724.        \tolerance=1000\relax
  725. { \catcode`\"=12
  726.   \global\mathcode`\\="705C \global\mathcode`\@="7040 }
  727. \@ifundefined{DocstyleParms}{}{}
  728. \DocstyleParms     \let\DocstyleParms\relax
  729. \@ifundefined{AmSTeX}
  730.    {\def\AmSTeX{\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
  731.         \hbox{$\mathcal M$}\kern-.2em\mathcal S$-\TeX}}}{}
  732. \@ifundefined{BibTeX}
  733.    {\def\BibTeX{{\rmfamily B\kern-.05em%
  734.     \textsc{i\kern-.025em b}\kern-.08em%
  735.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
  736. \@ifundefined{SliTeX}
  737.    {\def\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
  738.                 {\scshape i}\kern -.03em\TeX}}}{}
  739. \@ifundefined{PlainTeX}{\def\PlainTeX{\textsc{Plain}\kern2pt\TeX}}{}
  740. \@ifundefined{Web}{\def\Web{\textsc{Web}}}{}
  741. \def\MakePercentIgnore{\catcode`\%9\relax}
  742. \def\MakePercentComment{\catcode`\%14\relax}
  743. \def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment}
  744. \def\GetFileInfo#1{%
  745.   \def\filename{#1}%
  746.   \def\@tempb##1 ##2 ##3\relax##4\relax{%
  747.     \def\filedate{##1}%
  748.     \def\fileversion{##2}
  749.     \def\fileinfo{##3}}%
  750.   \edef\@tempa{\csname ver@#1\endcsname}%
  751.   \expandafter\@tempb\@tempa\relax? ? \relax\relax}
  752. \endinput
  753. %% 
  754. %% End of file `doc.sty'.
  755.